package demo.vo.tsdb;

import com.alibaba.fastjson.JSON;

import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author junying.han
 */
public class MetricFamily<T> {

    private String name;

    private String desc;

    private List<String> labelNames;

    private Map<List<String>, T> children;

    public MetricFamily(String name, String desc, List<String> labelNames) {
        this.name = name;
        this.desc = desc;
        this.labelNames = labelNames;
        this.children = new ConcurrentHashMap<>();
    }


    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }
}
